package dq.study.concurrent.semaphore;


/**
 * @author dongqun
 * @version 1.0
 * @description 类的功能描述
 * @date 2019/9/5 19:02
 */
public class MyThread extends Thread {

    ISemaphoreService semaphoreService;

    public MyThread(String name,ISemaphoreService semaphoreService){
        super();
        this.semaphoreService =  semaphoreService;
        this.setName(name);
    }

    @Override
    public void run() {
        semaphoreService.doSomething();
    }
}
